#pragma once

#include "ISaver.h"
#include "XmlElement.h"
#include <ostream>

class XmlSaver : public ISaver
{
private:
	std::ostream &s;
	int ident;

public:
	XmlSaver(std::ostream &s);

	void SaveAnimationStart();
	void SaveAnimationEnd();

	void SaveAnimationPresent();
	void SaveAnimationNotPresent();

	void SaveStartNodes(int nodesCount);
	void SaveEndNodes();
	
	void SaveStartNode(int nodeId);
	void SaveEndNode();

	void SavePositionBeginSection(int keysCount);
	void SavePositionKey(float time, float x, float y, float z);
	void SavePositionEndSection();

	void SaveRotationBeginSection(int keysCount);
	void SaveRotationKey(float time, float a, float x, float y, float z);
	void SaveRotationEndSection();

	void SaveScaleBeginSection(int keysCount);
	void SaveScaleKey(float time, float x, float y, float z);
	void SaveScaleEndSection();

	void SaveRollBeginSection(int keysCount);
	void SaveRollKey(float time, float v);
	void SaveRollEndSection();

	void SaveLocalTransformMatrix(float *v);
	void SaveObjectTransformMatrix(float *v);
	void SaveWorldTransformMatrix(float *v);
	void SaveInverseLocalTransformMatrix(float *v);
	void SaveInverseObjectTransformMatrix(float *v);
	void SaveInverseWorldTransformMatrix(float *v);

	void SavePivotPoint(float x, float y, float z);
};
